package com.zerocarbon.framework.core.properties;

import io.jsonwebtoken.SignatureAlgorithm;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

import static com.zerocarbon.framework.core.properties.JwtProperties.PREFIX;

/**
 * 认证服务端 属性
 * @author wyf  2020年6月6日
 */
@Data
@NoArgsConstructor
@ConfigurationProperties(prefix = PREFIX)
public class JwtProperties {
	
    public static final String PREFIX = "zerocarbon.jwttoken";
    
    public SignatureAlgorithm alg = SignatureAlgorithm.RS256;

    /**
     * 过期时间 2h
     */
    private Long expire = 7200L;
    
    /**
     * 刷新token的过期时间 7天
     */
    private Long refreshExpire = 7l * 24l * 60l * 60l;
    
    private String jwtSecret;				//jwt验证密钥
    
    private String privateKey;				//私钥
    
    private String publicKey;				//公告钥
}
